<%--
    Document   : Index
    Created on : Nov 24, 2012, 03:10:27 PM
    Author     : HongDC
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Books561</title>
        <link rel="stylesheet" href="../assets/style.css">
    </head>
    <body class="admin">
        <%@include file="ad_header.jsp" %>
        <div class="container">
        <% if (session.getAttribute("USER") != null && ((LoginBean) session.getAttribute("USER")).getType().equals("Admin")) {%>
            <h2>Batch Import</h2>
            <h4>Please upload a XML file containing book records</h4>
            <form id="import" method="POST" enctype="multipart/form-data" action="../AdminController?action=Upload">
                <input type="file" required accept="text/xml" name="importFile">
                <input type="submit" name="action" value="Upload">
            </form>
        <%} else {%>
        <h2>System management</h2>
        <center style="padding:150px 0px;">
            <h3>You are accessing the protected content.</h3>
            <p>If you are visiting this page by accident, please use the following link.</p><br>
            <a class="btn" href="../">Back to Home</a>
        </center>
        <%}%>
        </div>
        <%@include file="ad_footer.jsp" %>
    </body>
</html>